export default {
  timeFormate () {
    let year = new Date().getFullYear()
    let month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
    let date = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
    let hh = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours()
    let mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
    let nowTime = year + '年' + month + '月' + date + '日' + ' ' + hh + ':' + mm
    return nowTime
    // console.log(year)
    // console.log(this)
  },
  nowTimes () {
    this.timeFormate(new Date())
    setInterval(this.nowTimes, 1000)
    this.clear()
  },
  clear () {
    clearInterval(this.nowTimes)
    this.nowTimes = null
  },
  text () {
    console.log(1111)
  }
}
